import axios from '@/utils/request'

export const regAPI = data => {
  return axios.post('/api/reg', data)
}
export const loginAPI = data => {
  return axios.post('/api/login', data)
}
export const getUserAPI = () => {
  return axios.get('/my/userinfo')
}
export const updateUserAPI = data => {
  return axios.put('/my/userinfo', data)
}
export const updatePwdAPI = data => {
  return axios.patch('/my/updatepwd', data)
}
export const updateAvatarAPI = str => {
  return axios.patch('/my/update/avatar', { avatar: str })
}
